/**
 * All-right reserved by gglu\lqz\qq 2010-2020
 */
package com.injury.hunan.spring.mvc.interceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import com.injury.hunan.common.InjuryRuntimeException;

/**
 * 请写上此类的主要功能
 * @author gglu
 * @version 2008年7月21日 上午1:10:09
 * @surpportjdk 1.5+
 * 
 */
public class InjuryMvcExceptionInterceptor implements HandlerInterceptor {

	/** 
	 * @author ThinKPad
	 * @since 2008年7月21日 上午1:10:09
	 * @see org.springframework.web.servlet.HandlerInterceptor#preHandle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object)
	 */
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {

		return true;
	}

	/** 
	 * @author ThinKPad
	 * @since 2008年7月21日 上午1:10:09
	 * @see org.springframework.web.servlet.HandlerInterceptor#postHandle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, org.springframework.web.servlet.ModelAndView)
	 */
	public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
			ModelAndView modelAndView) throws Exception {
	}

	/** 
	 * @author ThinKPad
	 * @since 2008年7月21日 上午1:10:09
	 * @see org.springframework.web.servlet.HandlerInterceptor#afterCompletion(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, java.lang.Exception)
	 */
	public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
			throws Exception {
		
		// 处理异常 .可以考虑如何让用户看起来舒服点.
		if(ex instanceof InjuryRuntimeException){
			
			
		}
	}

}
